import { Injectable } from '@nestjs/common';
import { CategoryService } from 'src/module/grocery/service/category.service';

@Injectable()
export class CateService {
  constructor(private readonly categoryService: CategoryService) {}

  async findOne(id: number) {
    const res = await this.categoryService.findOne(id);
    return res;
  }

  async findAll(pageDto) {
    const params = {
      pageDto,
      queryDto: {
        id: null,
        title: '',
        remark: '',
      },
    };
    const res = await this.categoryService.findAll(params);
    return res;
  }
}
